<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改焊接质量追溯与分析')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-report-edit" th:object="${alarmReport}">
            <input name="alarmGroup" th:field="*{alarmGroup}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">所属班组：</label>
                <div class="col-sm-8">
                    <input name="alarmGroup" th:field="*{alarmGroup}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">工作令号：</label>
                <div class="col-sm-8">
                    <input name="deviceId" th:field="*{deviceId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">图号：</label>
                <div class="col-sm-8">
                    <input name="deviceNum" th:field="*{deviceNum}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">炉号：</label>
                <div class="col-sm-8">
                    <input name="groupId" th:field="*{groupId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">焊工：</label>
                <div class="col-sm-8">
                    <input name="operator" th:field="*{operator}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">故障代码：</label>
                <div class="col-sm-8">
                    <input name="alarmCode" th:field="*{alarmCode}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">工序编码：</label>
                <div class="col-sm-8">
                    <input name="alarmCurrent" th:field="*{alarmCurrent}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">焊缝编码：</label>
                <div class="col-sm-8">
                    <input name="alarmVoltage" th:field="*{alarmVoltage}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">故障开始时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="alarmStart" th:value="${#dates.format(alarmReport.alarmStart, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">故障结束时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="alarmStop" th:value="${#dates.format(alarmReport.alarmStop, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">故障描述：</label>
                <div class="col-sm-8">
                    <input name="resever1" th:field="*{resever1}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "alarm/report";
        $("#form-report-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-report-edit').serialize());
            }
        }

        $("input[name='alarmStart']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='alarmStop']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>